package com.skywork.controller.response.base;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.Data;

@Data
public class BaseResponse<T> {

	private String code = "0";
	
	private String message;
	
	private T data;
	
	@JsonIgnore
	private String encryptStr;
	
	public BaseResponse() {}
	
	public BaseResponse(String code, String message) {
		this.code = code;
		this.message = message;
	}


	public Object getData() {
		if(encryptStr!=null) {
			return this.encryptStr;
		}
		return data;
	}

}
